package com.weilive.platform.dao.admin;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.weilive.platform.dao.admin.mapper.AdminInfoDO;

@Repository
public interface PlatformAdminDAO {

	@Select("select * from admin_info where game_id = #{game_id}, account = #{account}")
	@ResultMap("com.weilive.platform.dao.admin.mapper.AdminInfoMap")
	public AdminInfoDO getAdmin(@Param("game_id")int game_id,@Param("account")String account);
	
	@Insert("insert into admin_log (admin_id, type, action, result) values (#{admin_id}, #{type}, #{action}, #{result})")
	public int addAdminLog(@Param("admin_id")int admin_id, @Param("type")String type, @Param("action")String action, @Param("result")String result);
}
